package io;

import sun.plugin2.liveconnect.BrowserSideObject;

import java.io.*;

/**
 * 说明:
 *
 * @author:SuZhongHe
 * @date:2023/3/8
 **/
public class CopyDemo3Buffered {
    public static void main(String[] args) throws IOException {
        FileInputStream fis = new FileInputStream("001.jpg");
        BufferedInputStream bis = new BufferedInputStream(fis);
        FileOutputStream fos = new FileOutputStream("001_04copy.jpg");
        BufferedOutputStream bos = new BufferedOutputStream(fos);
        int d;
        while ((d=bis.read())!=-1){
            bos.write(d);
        }
        System.out.println("复制完毕");
    }
}
